package com.woniuxy.dao;

import com.woniuxy.entity.PaperItem;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @BelongsProject: Online-education-examination-platform-back
 * @BelongsPackage: com.woniuxy.dao
 * @Author: Banol Zi
 * @CreateTime: 2022-06-08  10:51
 * @Description: TODO
 * @Version: 1.0
 */
@Mapper
public interface PaperItemDao {
    List<PaperItem> findAll();
    //查询所有试卷列表
    List<PaperItem> findAllP(Map map);
    PaperItem findPaperItemById(Integer id);

    //按照id删除试卷
    int deletePById(Integer tid);
    Integer insertJSON(PaperItem paperItem);

    Integer updateJSON(PaperItem paperItem);


    /**
     * 根据试卷分类编号查询其下所有的试卷
     * @return
     */
    List<PaperItem> findPaperItemByCategoryId(int id);

    //添加试卷
    Boolean addPaper(PaperItem paperItem);
    //改变试卷状态
    Boolean changePstatus(PaperItem paperItem);


}
